﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <title>表单打印模板</title>
    <!-- 于庆海 -->
    <link href="../../../Scripts/easyUI145/themes/color.css" rel="stylesheet" />
    <link href="../../../Scripts/easyUI145/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../../../DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../../../Scripts/QueryString.js" type="text/javascript"></script>
    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="../../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../../Comm/Gener.js"></script>
    <script type="text/javascript" src="../../CCFlowEnum.js"></script>
    <script type="text/javascript" src="./DDLBar.js"></script>
    <script type="text/javascript" language="javascript">
        //页面启动函数.
        $(function () {
            InitBar(TemplateFileModel.RTF);
            $("#Msg").html("正在加载,请稍后......");

            InitPage();

            $("#Msg").html("");
        });

        //初始化数据.
        function InitPage() {

            //设定枚举值下拉框.
            GenerBindEnumKey("DDL_BillFileType", "BillFileType", 0);
            var currBill = SetTableList();
            //调用公共类库的方法:执行批量主表赋值
            if (currBill != null)
                GenerFullAllCtrlsVal(currBill);

        }
        function Btn_Save_Click() {
            var name = document.getElementById("TB_Name").value;
            if (name == "") {
                alert('请输入报表名称');
                return;
            }
            var handler = new HttpHandler("BP.WF.HttpHandler.WF_Admin_FoolFormDesigner_PrintTemplate");
            handler.AddUrlData();
            handler.AddFormData();
            handler.AddFileData();
            handler.AddPara("TemplateFileModel", TemplateFileModel.RTF);
            var data = handler.DoMethodReturnString("Bill_Save");
            if (data.indexOf('err@') >= 0) {
                alert(data);
                return;
            }
            Reload();

        }

        function Btn_New_Click() {

            document.getElementById("TB_No").value = "";
            document.getElementById("TB_Name").value = "";
        }       
    </script>
</head>
<body>
    <div id="bar"></div>
    
    <form id="cc" enctype="multipart/form-data" method="post">
        <fieldset>
            <legend>
                <label> 单据模版</label>
            </legend>
            <table style="width: 100%;">
                <tr>
                    <td>模版文件: </td>
                    <td> <input id="bill" type="file" name="bill"  accept=".rtf,.RTF" style="width: 60%; background-color:white" onchange="show()" /></td>
                    <td style="width: 15%;">模版名称 </td>
                    <td>
                        <input type="text" id="TB_Name" name="TB_Name" style="width: 80%; " />
                    </td>
                </tr>
                <tr>
                    <td>
                        生成的文件类型
                    </td>
                    <td>
                        <select id="DDL_BillFileType" name="DDL_BillFileType" style="width: 60%;" />
                    </td>
                    <td>打开方式</td>
                    <td>
                        <select id="DDL_BillOpenModel" name="DDL_BillOpenModel" style="width: 60%;">
                            <option value="0">下载到本地 </option>
                            <option value="1">在线打开</option>
                        </select>

                    </td>
                </tr>
                <tr>
                    <td>是否加载二维码</td>
                    <td>
                        <select id="DDL_QRModel" name="DDL_QRModel" style="width: 60%;">
                            <option value="0">不加载二维码 </option>
                            <option value="1">加载二维码 </option>
                        </select>
                    </td>

                    <td colspan="2"></td>
                </tr>

            </table>
        </fieldset>
        <fieldset>
            <legend>
                <label> 单据模版列表</label>
            </legend>
            <table style="width: 100%;" id="Table1">

                <tr>
                    <th style="width: 3%;">
                        序
                    </th>
                    <th style="width: 10%;">
                        编号
                    </th>
                    <th style="width: 20%;">
                        名称
                    </th>
                    <th style="width:130px">模版类型</th>
                    <th style="width:210px">
                        二维码生成方式
                    </th>
                    <th style="width: 20%;">
                        路径
                    </th>
                    <th style="width: 130px;">
                        操作
                    </th>
                </tr>
            </table>
        </fieldset>
       
    </form>
   
</body>
</html>
